<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01//EN">
		<html>
		<head>
		<meta http-equiv="Content-Type" content="text/html;charset=utf-8">
		<title>NotificationCenter</title>
		<META HTTP-EQUIV="EXPIRES" CONTENT=0>
		<link rel="stylesheet" href="../../../../docs.css">
		</head>
		<body>
		
<br>
<h1>Io Reference</h1>
<br><br><br>
<br><br><br>
<a class='column' href='../../index.html'>Core</a>
&nbsp;&nbsp;<font color=#ccc>/</font>&nbsp;&nbsp;
<a class='column' href='../index.html'>NotificationCenter</a>
&nbsp;&nbsp;<font color=#ccc>/</font>&nbsp;&nbsp;
<b>NotificationCenter</b>
<br><br><br>
<br><br><br>
<table border=0 cellspacing=0 style="margin-left:8em; width:40em; line-height:1.2em;">
<tr>
<td align=right></td>
<td></td>
<td>
An NotificationCenter similar to the one found in Apple's FoundationKit.
<p>
Example use:
<pre>
// in listener
listener := NotificationListener clone setTarget(self) setName("FeedDownloadedFile") start

// in sender
Notification clone setSender(self) setName("FeedDownloadedFile") post

// note: notifications can also be reused, and any extra data can be added in it's slots

// to stop listening
listener stop
</pre>
</td></tr>
<tr><td colspan=3>&nbsp;</td></tr>
<tr><td colspan=3>&nbsp;</td></tr>
<tr><td colspan=3>&nbsp;</td></tr>
<tr>
<td align=right>
</td>
<td></td>
<td>
<hr align=left color=#ddd height=1>
<br><br>
<a name="NotificationCenter-addListener"></a><b>
addListener(aNotificationListener)
</b>
<p>
<div class=slotDescription>
Removes aNotificationListener from listeners list. Returns self.
</div>
<a name="NotificationCenter-listeners"></a><b>
listeners
</b>
<p>
<div class=slotDescription>
Returns list of NotificationListeners.
</div>
<a name="NotificationCenter-postNotification"></a><b>
postNotification(aNotification)
</b>
<p>
<div class=slotDescription>
Sends aNotification to be handled by listeners. Returns self.  
Implementation:
<pre>
listeners foreach(handleNotification(n))
</pre>
</div>
</td>
</tr>
</table>
<br><br><br><br><br>
</body>
</html>
